﻿using System;
using System.Text;

namespace RpcHelper.Reflection
{
    public interface IReflectionBody
    {
        Type Type { get; }
        ReflectionType ClassType { get; }
        object GetValue(object source, string[] name);
        object GetValue(object source, int index);
        bool TryGet(string name,out IReflectionProperty property);
        IReflectionProperty[] Properties { get; }
        IReflectionProperty GetProperty(string name);
        object GetValue(object source, string name);
        bool IsEquals(IReflectionBody otherClass, object source, object other);

        string[] Change(object source, object other);
        string[] Change(IReflectionBody otherClass, object source, object other);
        bool IsEquals(object source, object other);
        void SetValue(object source, object obj, string name);
        void SetValue(object source, int index, object obj);
        string ToString(object source, params string[] remove);

        void ToString(object source, StringBuilder write);
    }
}